-
Notifications
You must be signed in to change notification settings - Fork 21
fix: Fix crawler deadlock when API fails during marking request as handled #768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #768 +/- ##
==========================================
+ Coverage 81.91% 82.11% +0.19%
==========================================
Files 46 46
Lines 2693 2695 +2
==========================================
+ Hits 2206 2213 +7
+ Misses 487 482 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
55bc2a2 to
b4bed05
Compare
| except Exception as exc: | ||
| logger.debug(f'Error marking request {request.unique_key} as handled: {exc!s}') | ||
| except Exception: | ||
| logger.exception(f'Error marking request {request.unique_key} as handled.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will logger.exception still include the traceback if we're not using {exc!s}?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it comes with default exc_info=True
b4bed05 to
6db57ef
Compare
…arking request as failed
6db57ef to
425093b
Compare
Description
RequestQueueis in an invalid state due to a failed API call to mark the request as handled. This invalid state can lead to a crawler deadlock.ApifyRequestQueueSingleClient, as for the shared client, it is not possible to distinguish between API failure and external modification of the queue on the platform.Issues
Testing
Checklist